function isVisible(obj) {//原生DOM对象
  let topHeight = $(window).scrollTop()
  let bottomHeight = $(window).scrollTop() + document.documentElement.clientHeight
  // let domHeight = obj.offsetTop + obj.offsetHeight/2
  let domHeight = obj.offsetTop + 50;
  return domHeight > topHeight && domHeight < bottomHeight
}

function showIsActive(i){

  $(`.menu>li:nth-child(${i}),.hide-menu>li:nth-child(${i})`).addClass('is-active').siblings().removeClass('is-active')
}


